import React from 'react'

const Home=React.lazy(()=>import('../pages/Home'))
const List=React.lazy(()=>import('../pages/List'))
const Main=React.lazy(()=>import('../pages/Home'))

const Layout=React.lazy(()=>import('../Layout'))
const Detail=React.lazy(()=>import('../pages/Detail'))

const menuRouter=[{
    path:'/layout/home',
    name:'系统主页',
    element:<Home/>
},{
    path:'/layout/list',
    name:'考试管理',
    element:<List/>
},{
    path:'/layout/main',
    name:'用户管理',
    element:<Main/>
}]

const routes=[{
    path:'/layout',
    element:<Layout/>,
    children:menuRouter
},{
    path:'/detail/:id',
    element:<Detail/>
},{
    from:'/',
    to:'/layout/list'
}]

export {
    menuRouter,
    routes
}